import fetch from './fetch'

export function createPcOrder(data, params) {
	return fetch({
		url: 'insurance/insure/createPcOrder',
		method: 'post',
		data,
		params,
		headers: {
			'Content-Type': 'application/json'
		}
	})
}
// 光伏保查订单
export function queryOrder(params) {
	return fetch({
		url: 'insurance/business/queryOrder',
		method: 'get',
		params
	})
}
// 光伏保资料表单
export function queryGfbField(params) {
	return fetch({
		url: 'insurance/business/queryGfbField',
		method: 'get',
		params
	})
}
// 保存光伏保资料表单
export function saveGfbForm(data, params) {
	return fetch({
		url: 'insurance/business/saveGfbForm',
		method: 'post',
		data,
		params,
		headers: {
			'Content-Type': 'application/json'
		}
	})
}

// 获取订单签章链接
export function querySendStamp({ businessId }) {
	return fetch({
		url: 'insurance/business/sendStamp',
		method: 'get',
		params: { businessId }
	})
}

// 获取支付方式
export function queryPay({ businessId }) {
	return fetch({
		url: 'insurance/business/queryPay',
		method: 'get',
		params: { businessId }
	})
}
// 保存支付凭证
export function saveVoucher(data) {
	return fetch({
		url: 'insurance/business/saveVoucher',
		method: 'post',
		data,
		headers: {
			'Content-Type': 'application/json;charset=UTF-8'
		}
	})
}

// 项目资料查询
export function orderDetail({ businessId }) {
	return fetch({
		url: 'insurance/insure/orderDetail',
		method: 'post',
		params: { businessId }
	})
}

// 订单详情几个字段
export function queryOrderDetail({ businessId }) {
	return fetch({
		url: 'insurance/business/queryOrderDetail',
		method: 'post',
		params: { businessId }
	})
}
